<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GtkSizeGroup</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="GTK+ 3 参考手册">
<link rel="up" href="MiscObjects.html" title="杂项">
<link rel="prev" href="gtk3-GtkIMMulticontext.html" title="GtkIMMulticontext">
<link rel="next" href="gtk3-GtkTooltip.html" title="GtkTooltip">
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="gtk3-GtkIMMulticontext.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="MiscObjects.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GTK+ 3 参考手册</th>
<td><a accesskey="n" href="gtk3-GtkTooltip.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#gtk3-GtkSizeGroup.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#gtk3-GtkSizeGroup.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="gtk3-GtkSizeGroup"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="gtk3-GtkSizeGroup.top_of_page"></a>GtkSizeGroup</span></h2>
<p>GtkSizeGroup</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="gtk3-GtkSizeGroup.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;gtk/gtk.h&gt;

struct              <a class="link" href="gtk3-GtkSizeGroup.html#GtkSizeGroup" title="struct GtkSizeGroup">GtkSizeGroup</a>;
enum                <a class="link" href="gtk3-GtkSizeGroup.html#GtkSizeGroupMode" title="enum GtkSizeGroupMode">GtkSizeGroupMode</a>;
<a class="link" href="gtk3-GtkSizeGroup.html#GtkSizeGroup" title="struct GtkSizeGroup"><span class="returnvalue">GtkSizeGroup</span></a> *      <a class="link" href="gtk3-GtkSizeGroup.html#gtk-size-group-new" title="gtk_size_group_new ()">gtk_size_group_new</a>                  (<em class="parameter"><code><a class="link" href="gtk3-GtkSizeGroup.html#GtkSizeGroupMode" title="enum GtkSizeGroupMode"><span class="type">GtkSizeGroupMode</span></a> mode</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkSizeGroup.html#gtk-size-group-set-mode" title="gtk_size_group_set_mode ()">gtk_size_group_set_mode</a>             (<em class="parameter"><code><a class="link" href="gtk3-GtkSizeGroup.html#GtkSizeGroup" title="struct GtkSizeGroup"><span class="type">GtkSizeGroup</span></a> *size_group</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkSizeGroup.html#GtkSizeGroupMode" title="enum GtkSizeGroupMode"><span class="type">GtkSizeGroupMode</span></a> mode</code></em>);
<a class="link" href="gtk3-GtkSizeGroup.html#GtkSizeGroupMode" title="enum GtkSizeGroupMode"><span class="returnvalue">GtkSizeGroupMode</span></a>    <a class="link" href="gtk3-GtkSizeGroup.html#gtk-size-group-get-mode" title="gtk_size_group_get_mode ()">gtk_size_group_get_mode</a>             (<em class="parameter"><code><a class="link" href="gtk3-GtkSizeGroup.html#GtkSizeGroup" title="struct GtkSizeGroup"><span class="type">GtkSizeGroup</span></a> *size_group</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkSizeGroup.html#gtk-size-group-set-ignore-hidden" title="gtk_size_group_set_ignore_hidden ()">gtk_size_group_set_ignore_hidden</a>    (<em class="parameter"><code><a class="link" href="gtk3-GtkSizeGroup.html#GtkSizeGroup" title="struct GtkSizeGroup"><span class="type">GtkSizeGroup</span></a> *size_group</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> ignore_hidden</code></em>);
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gtk3-GtkSizeGroup.html#gtk-size-group-get-ignore-hidden" title="gtk_size_group_get_ignore_hidden ()">gtk_size_group_get_ignore_hidden</a>    (<em class="parameter"><code><a class="link" href="gtk3-GtkSizeGroup.html#GtkSizeGroup" title="struct GtkSizeGroup"><span class="type">GtkSizeGroup</span></a> *size_group</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkSizeGroup.html#gtk-size-group-add-widget" title="gtk_size_group_add_widget ()">gtk_size_group_add_widget</a>           (<em class="parameter"><code><a class="link" href="gtk3-GtkSizeGroup.html#GtkSizeGroup" title="struct GtkSizeGroup"><span class="type">GtkSizeGroup</span></a> *size_group</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkSizeGroup.html#gtk-size-group-remove-widget" title="gtk_size_group_remove_widget ()">gtk_size_group_remove_widget</a>        (<em class="parameter"><code><a class="link" href="gtk3-GtkSizeGroup.html#GtkSizeGroup" title="struct GtkSizeGroup"><span class="type">GtkSizeGroup</span></a> *size_group</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>);
<a href="../glib/glib-Singly-Linked-Lists.html#GSList"><span class="returnvalue">GSList</span></a> *            <a class="link" href="gtk3-GtkSizeGroup.html#gtk-size-group-get-widgets" title="gtk_size_group_get_widgets ()">gtk_size_group_get_widgets</a>          (<em class="parameter"><code><a class="link" href="gtk3-GtkSizeGroup.html#GtkSizeGroup" title="struct GtkSizeGroup"><span class="type">GtkSizeGroup</span></a> *size_group</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="gtk3-GtkSizeGroup.description"></a><h2>Description</h2>
<p>
</p>
</div>
<div class="refsect1">
<a name="gtk3-GtkSizeGroup.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="GtkSizeGroup"></a><h3>struct GtkSizeGroup</h3>
<pre class="programlisting">struct GtkSizeGroup {
  GObject parent_instance;
};
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkSizeGroupMode"></a><h3>enum GtkSizeGroupMode</h3>
<pre class="programlisting">typedef enum {
  GTK_SIZE_GROUP_NONE,
  GTK_SIZE_GROUP_HORIZONTAL,
  GTK_SIZE_GROUP_VERTICAL,
  GTK_SIZE_GROUP_BOTH
} GtkSizeGroupMode;
</pre>
<p>
The mode of the size group determines the directions in which the size
group affects the requested sizes of its component widgets.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="GTK-SIZE-GROUP-NONE:CAPS"></a><span class="term"><code class="literal">GTK_SIZE_GROUP_NONE</code></span></p></td>
<td>group has no effect
</td>
</tr>
<tr>
<td><p><a name="GTK-SIZE-GROUP-HORIZONTAL:CAPS"></a><span class="term"><code class="literal">GTK_SIZE_GROUP_HORIZONTAL</code></span></p></td>
<td>group affects horizontal requisition
</td>
</tr>
<tr>
<td><p><a name="GTK-SIZE-GROUP-VERTICAL:CAPS"></a><span class="term"><code class="literal">GTK_SIZE_GROUP_VERTICAL</code></span></p></td>
<td>group affects vertical requisition
</td>
</tr>
<tr>
<td><p><a name="GTK-SIZE-GROUP-BOTH:CAPS"></a><span class="term"><code class="literal">GTK_SIZE_GROUP_BOTH</code></span></p></td>
<td>group affects both horizontal and vertical requisition
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-size-group-new"></a><h3>gtk_size_group_new ()</h3>
<pre class="programlisting"><a class="link" href="gtk3-GtkSizeGroup.html#GtkSizeGroup" title="struct GtkSizeGroup"><span class="returnvalue">GtkSizeGroup</span></a> *      gtk_size_group_new                  (<em class="parameter"><code><a class="link" href="gtk3-GtkSizeGroup.html#GtkSizeGroupMode" title="enum GtkSizeGroupMode"><span class="type">GtkSizeGroupMode</span></a> mode</code></em>);</pre>
<p>
Create a new <a class="link" href="gtk3-GtkSizeGroup.html#GtkSizeGroup" title="struct GtkSizeGroup"><span class="type">GtkSizeGroup</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>mode</code></em> :</span></p></td>
<td>the mode for the new size group.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a newly created <a class="link" href="gtk3-GtkSizeGroup.html#GtkSizeGroup" title="struct GtkSizeGroup"><span class="type">GtkSizeGroup</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-size-group-set-mode"></a><h3>gtk_size_group_set_mode ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_size_group_set_mode             (<em class="parameter"><code><a class="link" href="gtk3-GtkSizeGroup.html#GtkSizeGroup" title="struct GtkSizeGroup"><span class="type">GtkSizeGroup</span></a> *size_group</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkSizeGroup.html#GtkSizeGroupMode" title="enum GtkSizeGroupMode"><span class="type">GtkSizeGroupMode</span></a> mode</code></em>);</pre>
<p>
Sets the <a class="link" href="gtk3-GtkSizeGroup.html#GtkSizeGroupMode" title="enum GtkSizeGroupMode"><span class="type">GtkSizeGroupMode</span></a> of the size group. The mode of the size
group determines whether the widgets in the size group should
all have the same horizontal requisition (<a class="link" href="gtk3-GtkSizeGroup.html#GTK-SIZE-GROUP-HORIZONTAL:CAPS"><code class="literal">GTK_SIZE_GROUP_HORIZONTAL</code></a>)
all have the same vertical requisition (<a class="link" href="gtk3-GtkSizeGroup.html#GTK-SIZE-GROUP-VERTICAL:CAPS"><code class="literal">GTK_SIZE_GROUP_VERTICAL</code></a>),
or should all have the same requisition in both directions
(<a class="link" href="gtk3-GtkSizeGroup.html#GTK-SIZE-GROUP-BOTH:CAPS"><code class="literal">GTK_SIZE_GROUP_BOTH</code></a>).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>size_group</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkSizeGroup.html#GtkSizeGroup" title="struct GtkSizeGroup"><span class="type">GtkSizeGroup</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>mode</code></em> :</span></p></td>
<td>the mode to set for the size group.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-size-group-get-mode"></a><h3>gtk_size_group_get_mode ()</h3>
<pre class="programlisting"><a class="link" href="gtk3-GtkSizeGroup.html#GtkSizeGroupMode" title="enum GtkSizeGroupMode"><span class="returnvalue">GtkSizeGroupMode</span></a>    gtk_size_group_get_mode             (<em class="parameter"><code><a class="link" href="gtk3-GtkSizeGroup.html#GtkSizeGroup" title="struct GtkSizeGroup"><span class="type">GtkSizeGroup</span></a> *size_group</code></em>);</pre>
<p>
Gets the current mode of the size group. See <a class="link" href="gtk3-GtkSizeGroup.html#gtk-size-group-set-mode" title="gtk_size_group_set_mode ()"><code class="function">gtk_size_group_set_mode()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>size_group</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkSizeGroup.html#GtkSizeGroup" title="struct GtkSizeGroup"><span class="type">GtkSizeGroup</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the current mode of the size group.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-size-group-set-ignore-hidden"></a><h3>gtk_size_group_set_ignore_hidden ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_size_group_set_ignore_hidden    (<em class="parameter"><code><a class="link" href="gtk3-GtkSizeGroup.html#GtkSizeGroup" title="struct GtkSizeGroup"><span class="type">GtkSizeGroup</span></a> *size_group</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> ignore_hidden</code></em>);</pre>
<p>
Sets whether unmapped widgets should be ignored when
calculating the size.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>size_group</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkSizeGroup.html#GtkSizeGroup" title="struct GtkSizeGroup"><span class="type">GtkSizeGroup</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>ignore_hidden</code></em> :</span></p></td>
<td>whether unmapped widgets should be ignored
when calculating the size</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.8</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-size-group-get-ignore-hidden"></a><h3>gtk_size_group_get_ignore_hidden ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gtk_size_group_get_ignore_hidden    (<em class="parameter"><code><a class="link" href="gtk3-GtkSizeGroup.html#GtkSizeGroup" title="struct GtkSizeGroup"><span class="type">GtkSizeGroup</span></a> *size_group</code></em>);</pre>
<p>
Returns if invisible widgets are ignored when calculating the size.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>size_group</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkSizeGroup.html#GtkSizeGroup" title="struct GtkSizeGroup"><span class="type">GtkSizeGroup</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if invisible widgets are ignored.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.8</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-size-group-add-widget"></a><h3>gtk_size_group_add_widget ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_size_group_add_widget           (<em class="parameter"><code><a class="link" href="gtk3-GtkSizeGroup.html#GtkSizeGroup" title="struct GtkSizeGroup"><span class="type">GtkSizeGroup</span></a> *size_group</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>);</pre>
<p>
Adds a widget to a <a class="link" href="gtk3-GtkSizeGroup.html#GtkSizeGroup" title="struct GtkSizeGroup"><span class="type">GtkSizeGroup</span></a>. In the future, the requisition
of the widget will be determined as the maximum of its requisition
and the requisition of the other widgets in the size group.
Whether this applies horizontally, vertically, or in both directions
depends on the mode of the size group. See <a class="link" href="gtk3-GtkSizeGroup.html#gtk-size-group-set-mode" title="gtk_size_group_set_mode ()"><code class="function">gtk_size_group_set_mode()</code></a>.
</p>
<p>
When the widget is destroyed or no longer referenced elsewhere, it will 
be removed from the size group.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>size_group</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkSizeGroup.html#GtkSizeGroup" title="struct GtkSizeGroup"><span class="type">GtkSizeGroup</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>widget</code></em> :</span></p></td>
<td>the <a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> to add</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-size-group-remove-widget"></a><h3>gtk_size_group_remove_widget ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_size_group_remove_widget        (<em class="parameter"><code><a class="link" href="gtk3-GtkSizeGroup.html#GtkSizeGroup" title="struct GtkSizeGroup"><span class="type">GtkSizeGroup</span></a> *size_group</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>);</pre>
<p>
Removes a widget from a <a class="link" href="gtk3-GtkSizeGroup.html#GtkSizeGroup" title="struct GtkSizeGroup"><span class="type">GtkSizeGroup</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>size_group</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkSizeGroup.html#GtkSizeGroup" title="struct GtkSizeGroup"><span class="type">GtkSizeGroup</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>widget</code></em> :</span></p></td>
<td>the <a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> to remove</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-size-group-get-widgets"></a><h3>gtk_size_group_get_widgets ()</h3>
<pre class="programlisting"><a href="../glib/glib-Singly-Linked-Lists.html#GSList"><span class="returnvalue">GSList</span></a> *            gtk_size_group_get_widgets          (<em class="parameter"><code><a class="link" href="gtk3-GtkSizeGroup.html#GtkSizeGroup" title="struct GtkSizeGroup"><span class="type">GtkSizeGroup</span></a> *size_group</code></em>);</pre>
<p>
Returns the list of widgets associated with <em class="parameter"><code>size_group</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>size_group</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkSizeGroup.html#GtkSizeGroup" title="struct GtkSizeGroup"><span class="type">GtkSizeGroup</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <a href="../glib/glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> of
widgets. The list is owned by GTK+ and should not be modified. <span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GtkWidget][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.10</p>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.18</div>
</body>
</html>